package com.thinkgem.jeesite.modules.sys.entity;

import com.thinkgem.jeesite.common.persistence.MyDataEntity;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;

import java.math.BigDecimal;
import java.util.Date;

public class TbUserTenementInfo extends MyDataEntity<TbUserTenementInfo> {

    private Integer id;

    private String uid;

    private String idCardNo;

    private String cellname;


    //业主姓名----
    private String name;

    private String mobile;

    private Integer communityId;

    private Double buildingNo;//返还系数



    private String buildNum;//楼号
    private Integer unitNo;//单元号
    private Integer floorNo;//楼层
    private String showName;//门牌号


    private Integer doorNo;

    private Integer backFlag;//标记位是否返还金额


    private Double coveredArea;

    private BigDecimal propertyFee;
    //缴费金额
    private BigDecimal totalFee;
    //返消费缴费系数
    private BigDecimal coefficient;
    private BigDecimal teneFee;
    //返还消费金额
    private BigDecimal backFee;

    private Date createTime;

    private Date updateTime;

    private Byte isDelete;

    private String mobilePhone;

    private Integer province;

    private String provinceName;
    private String commName;
    private String month;//在物业缴费时存放月数
    private BigDecimal money;

    private Integer city;

    private String cityName;

    private Integer areas;

    private String tenementType;//物业缴费类型缴费

    private String isActive;//是否参加返现活动

    private String areaname;

    private String isok;

    public String getIsok() {
        return isok;
    }

    public void setIsok(String isok) {
        this.isok = isok;
    }

    public String getTenementType() {
        return tenementType;
    }

    public void setTenementType(String tenementType) {
        this.tenementType = tenementType;
    }

    public String getIsActive() {
        return isActive;
    }

    public void setIsActive(String isActive) {
        this.isActive = isActive;
    }

    public Integer getBackFlag() {
        return backFlag;
    }

    public void setBackFlag(Integer backFlag) {
        this.backFlag = backFlag;
    }

    public BigDecimal getTeneFee() {
        return teneFee;
    }

    public void setTeneFee(BigDecimal teneFee) {
        this.teneFee = teneFee;
    }

    public Integer getProvince() {
        return province;
    }

    public void setProvince(Integer province) {
        this.province = province;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getCommName() {
        return commName;
    }

    public void setCommName(String commName) {
        this.commName = commName;
    }

    public Integer getCity() {
        return city;
    }

    public void setCity(Integer city) {
        this.city = city;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public Integer getAreas() {
        return areas;
    }

    public void setAreas(Integer areas) {
        this.areas = areas;
    }

    public String getAreaname() {
        return areaname;
    }

    public void setAreaname(String areaname) {
        this.areaname = areaname;
    }

    public String getMobilePhone() {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    private Date beginDate;		// 开始日期
    private Date endDate;		// 结束日期
    public Date getBeginDate() {
        return beginDate;
    }

    public String getMonth() {
        return month;
    }

    public void setMonth(String month) {
        this.month = month;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }
    @ExcelField(title="业主姓名",align=2, sort=2)
    public String getName() {
        return name;
    }

    public void setName(String username) {
        this.name = username;
    }
    @ExcelField(title="小区名称", align=2, sort=1)
    public String getCellname() {
        return cellname;
    }

    public void setCellname(String cellname) {
        this.cellname = cellname;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getIdCardNo() {
        return idCardNo;
    }

    public void setIdCardNo(String idCardNo) {
        this.idCardNo = idCardNo == null ? null : idCardNo.trim();
    }
    @ExcelField(title="联系电话", align=2, sort=3)
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile == null ? null : mobile.trim();
    }

    public Integer getCommunityId() {
        return communityId;
    }

    public void setCommunityId(Integer communityId) {
        this.communityId = communityId;
    }

    public Double getBuildingNo() {
        return buildingNo;
    }

    public void setBuildingNo(Double buildingNo) {
        this.buildingNo = buildingNo;
    }
    @ExcelField(title=" 单元号", align=2 ,sort=35)
    public Integer getUnitNo() {
        return unitNo;
    }

    public void setUnitNo(Integer unitNo) {
        this.unitNo = unitNo;
    }
    public Integer getFloorNo() {
        return floorNo;
    }

    public void setFloorNo(Integer floorNo) {
        this.floorNo = floorNo;
    }

    public Integer getDoorNo() {
        return doorNo;
    }

    public void setDoorNo(Integer doorNo) {
        this.doorNo = doorNo;
    }
    @ExcelField(title=" 门牌", align=2 ,sort=60)
    public String getShowName() {
        return showName;
    }

    public void setShowName(String showName) {
        this.showName = showName == null ? null : showName.trim();
    }
    @ExcelField(title="住房面积", align=2 ,sort=70)
    public Double getCoveredArea() {
        return coveredArea;
    }

    public void setCoveredArea(Double coveredArea) {
        this.coveredArea = coveredArea;
    }
    @ExcelField(title="物业费单价", align=2 ,sort=80)
    public BigDecimal getPropertyFee() {
        return propertyFee;
    }

    public void setPropertyFee(BigDecimal propertyFee) {
        this.propertyFee = propertyFee;
    }
    @ExcelField(title="缴费金额", align=2,sort=90)
    public BigDecimal getTotalFee() {
        return propertyFee.multiply(new BigDecimal(Double.toString(coveredArea))).setScale(2,BigDecimal.ROUND_HALF_UP);
    }

    public void setTotalFee(BigDecimal totalFee) {
        this.totalFee = totalFee;
    }
    @ExcelField(title="返消费缴费系数", align=2 ,sort=100)
    public BigDecimal getCoefficient() {
       // return new BigDecimal(Double.toString(Configuration.getInstance().getDoubleConfiguration("coefficient")));
        return coefficient;
    }

    public void setCoefficient(BigDecimal coefficient) {
        this.coefficient = coefficient ;
    }
    @ExcelField(title="返消费缴费金额",align=2,sort=110)
    public BigDecimal getBackFee() {
        return propertyFee.multiply(new BigDecimal(Double.toString(coveredArea))).multiply(new BigDecimal(this.getBuildingNo())).setScale(2,BigDecimal.ROUND_HALF_UP);
    }

    public void setBackFee(BigDecimal backFee) {
        this.backFee = backFee;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Byte getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Byte isDelete) {
        this.isDelete = isDelete;
    }

    @Override
    public void preInsert() {

    }

    @Override
    public void preUpdate() {

    }
    @ExcelField(title="楼号", align=2 ,sort=25)
    public String getBuildNum() {
        return buildNum;
    }

    public void setBuildNum(String buildNum) {
        this.buildNum = buildNum;
    }
}